//
//  SegmentViewController.h
//  XinYiGou
//
//  Created by Angel_Yan on 2017/8/8.
//  Copyright © 2017年 Angel_Yan. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "BaseViewController.h"

@class CollectionViewCellTitles;
@class CollectionViewCellCotents;

// 数据模型
@interface SegmentItemModel : NSObject
@property(nonatomic,strong)NSMutableArray *mArrData;///< 内容
@property(nonatomic,assign)NSInteger pageIndex;///< 当前页数
@property(nonatomic,strong)NSString *title;///< 标题
@end



static NSString *colCellTitle = @"XYGCollectionViewCellCagetory";
static NSString *colCellContent = @"XYGCollectionViewCellCagetory";
// ViewController
@interface SegmentViewController : BaseViewController
// titles
@property (nonatomic , retain) UICollectionView *col_Titles;
@property (nonatomic , retain) UIView *viewLineBg;
// contents
@property (nonatomic , retain) UICollectionView *col_Contents;
// 游标
@property (nonatomic , strong) UIView *viewLine;
// 宽度
@property (nonatomic , assign) CGFloat colTitleCellWidth;
//
@property (nonatomic , strong) NSIndexPath *selectIndexPath;

///< 重写
-(CollectionViewCellTitles*)titleCellWithCollection:(UICollectionView *)col indexPath:(NSIndexPath *)indexPath object:(SegmentItemModel *)object;
-(CollectionViewCellCotents*)contentCellWithCollection:(UICollectionView *)col indexPath:(NSIndexPath *)indexPath object:(SegmentItemModel *)object;

@end




#pragma mark  - cell

// title cel
@interface CollectionViewCellTitles : UICollectionViewCell

@property (strong , nonatomic) UILabel *labTitle;

@end


// content cell
@interface CollectionViewCellCotents : UICollectionViewCell

@property (strong , nonatomic) UIViewController *vcTag;
@property (strong , nonatomic , readonly) UITableView *tableViewContents;
@property (strong , nonatomic) SegmentItemModel* dataModel;

- (void)reloadDataWithData:(SegmentItemModel*)dataModel;

// 子类需要重写tableView delegate
//// colCell刷新界面的方法 子类需要继承并重写的方法

// tableView 请求数据的方法 子类需要继承并重写的方法
- (void)requsetDataWithItem:(SegmentItemModel *)item tableView:(UITableView *)tabV;

@end


